package com.download.web.entity.model;

import com.download.web.entity.BusArticleDownload;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @description: 文章model
 * @author: cmy
 * @create: 2019-02-21 11:03
 **/
@Getter
@Setter
public class ArticleModel {

    private Integer id;
    /**
     * 文章内容
     */
    private String content;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 浏览人数
     */
    private Integer browseNum;

    /**
     * 文章路径
     */
    private String url;

    /**
     * 文章标题
     */
    private String title;

    /**
     * 文章一级分类
     */
    private Integer type;
    private String typeName;
    /**
     * 文章二级分类
     */
    @NotNull(message = "请选择文章分类")
    private Integer underType;

    /**
     * 可见类型，1全部可见，2登录可见，购买可见
     */
    private String visibleType;

    //文章图片
    private String img;

    //文章app图片
    private String appImg;


    //标签
//    private List<Integer> labels;
    //标签
    private List<String> labelVals;

    //下载地址
    private  List<BusArticleDownload> downloadUrl;

    private String metaTitle;
    private String metaKeywords;
    private String metaDescribtion;
//    private String name;

    private String isRotation;

    private String category;

    private String appName;
}
